import ajax from "../utils/request";

// 验证手机号是否被注册的接口
export function getCheckPhone(data:{tel: string}){
  return ajax({
    url: '/user/docheckphone',
    method: 'post',
    data
  })
}


// 发送手机验证码的数据请求
export function getSendMsgCode(data:{tel: string}){
  return ajax({
    url: '/user/dosendmsgcode',
    method: 'post',
    data
  })
}


// 验证验证码是否正确
export function getCheckCode(data:{tel: string, telcode: string}){
  return ajax({
    url: '/user/docheckcode',
    method: 'post',
    data
  })
}
// 注册设置密码
export function setPassword(data:{tel: string, password: string}){
  return ajax({
    url: '/user/dofinishregister',
    method: 'post',
    data
  })
}

// 登录的数据请求
export function loginFn(data:{loginname: string, password: string}){
  return ajax({
    url: '/user/login',
    method: 'post',
    data
  })
}
